package common.data.business
{
	import mx.rpc.events.ResultEvent;
	import mx.rpc.remoting.RemoteObject;

	/**
	 * 命令服务类
	 */
	public class EmergencyService extends RemoteObject
	{
		public var getByTimeCallBack:Function;
		
		
		public function EmergencyService() {
			super("emergencyService");
			this.showBusyCursor = true;
			this.getOperation("getByTime").addEventListener(ResultEvent.RESULT,getByTimeResult,false,0,true);
		}
		
		public function getByTime(startTime:String,endTime:String):void{
			this.getOperation("getByTime").send(startTime,endTime);
		}
		
		private function getByTimeResult(e:ResultEvent):void{
			try{
				if(getByTimeCallBack != null){
					getByTimeCallBack.apply(this,[e]);
				}
			}catch(error:Error){
				trace(error.getStackTrace());
			}
		}
		
		
	}
}	